<template>
  <avue-form :option="userOption" v-model="userForm" @submit="$emit('submit')" />
</template>

<script>
export default {
  name: 'UserInfoSelect',
  data() {
    return {
      userForm: { deptId: '', roleId: '' },
      userOption: {
        labelWidth: 70,
        submitBtn: true,
        emptyBtn: false,
        submitText: '登录',
        column: [
          {
            label: '部门',
            prop: 'deptId',
            type: 'select',
            props: { label: 'deptName', value: 'id' },
            dicUrl: '/api/blade-system/dept/select',
            span: 24,
            display: false,
            rules: [{ required: true, message: '请选择部门', trigger: 'blur' }]
          },
          {
            label: '角色',
            prop: 'roleId',
            type: 'select',
            props: { label: 'roleName', value: 'id' },
            dicUrl: '/api/blade-system/role/select',
            span: 24,
            display: false,
            rules: [{ required: true, message: '请选择角色', trigger: 'blur' }]
          }
        ]
      }
    }
  }
}
</script>
